import { axios } from '@/utils/request'

const api = {
  shopAdd: '/md/add',
  shopList: '/md/list',
  shopEdit: '/md/edit',
  shopDel: '/md/del',
  shopAudit: '/md/audit',
  getCityList: '/shop/get-city-list',
  shopDetail: 'md/detail',
  changeContact:'md/manager',
  batch:'md/batch',
  auditList:'md/audit-list',
  batchAudit:'md/batch-audit',
  staffList:'md/staff',
  batchStaff:'md/staff-status',
  staffAdd:'md/staff-add',
  allShop:'md/select-list',
  profit:'md/profit',
  submitApplyInfo:'md/submit-other-info',
  applyInfo:'md/other-info',
  withDrawList:'md/cash-list',
  auditWithdraw:'md/cash-apply',
  confirmWithdraw:'md/cash-confirm',
  applyWithdraw:'md/cash-submit',
  clerkOrder:'md/clerk-order-list'
}

export default api

export function shopDetail(parameter) {
  return axios({
    url: api.shopDetail,
    method: 'get',
    params: parameter
  })
}
export function shopAudit(parameter) {
  return axios({
    url: api.shopAudit,
    method: 'post',
    data: parameter
  })
}
export function shopAdd(parameter) {
  return axios({
    url: api.shopAdd,
    method: 'post',
    data: parameter
  })
}
export function shopList(parameter) {
  return axios({
    url: api.shopList,
    method: 'get',
    params: parameter
  })
}
export function shopEdit(parameter) {
  return axios({
    url: api.shopEdit,
    method: 'post',
    data: parameter
  })
}
export function shopDel(parameter) {
  return axios({
    url: api.shopDel,
    method: 'get',
    params: parameter
  })
}
export function getCityList(parameter) {
  return axios({
    url: api.getCityList,
    method: 'get',
    params: parameter
  })
}
export function changeContact(parameter) {
  return axios({
    url: api.changeContact,
    method: 'post',
    data: parameter
  })
}
export function batch(parameter) {
  return axios({
    url: api.batch,
    method: 'post',
    data: parameter
  })
}
export function auditList(parameter) {
  return axios({
    url: api.auditList,
    method: 'get',
    params: parameter
  })
}
export function batchAudit(parameter) {
  return axios({
    url: api.batchAudit,
    method: 'post',
    data: parameter
  })
}
export function staffList(parameter) {
  return axios({
    url: api.staffList,
    method: 'get',
    params: parameter
  })
}
export function batchStaff(parameter) {
  return axios({
    url: api.batchStaff,
    method: 'post',
    data: parameter
  })
}
export function staffAdd(parameter) {
  return axios({
    url: api.staffAdd,
    method: 'post',
    data: parameter
  })
}
export function allShop(parameter) {
  return axios({
    url: api.allShop,
    method: 'get',
    params: parameter
  })
}
export function profit(parameter) {
  return axios({
    url: api.profit,
    method: 'get',
    params: parameter
  })
}
export function expProfit(parameter) {
  return axios({
    url: api.profit,
    method: 'get',
    params: parameter,
    responseType: 'blob'
  })
}
export function submitApplyInfo(parameter) {
  return axios({
    url: api.submitApplyInfo,
    method: 'post',
    data: parameter
  })
}
export function applyInfo(parameter) {
  return axios({
    url: api.applyInfo,
    method: 'get',
    params: parameter
  })
}
export function withDrawList(parameter) {
  return axios({
    url: api.withDrawList,
    method: 'get',
    params: parameter
  })
}
export function expwithDrawList(parameter) {
  return axios({
    url: api.withDrawList,
    method: 'get',
    params: parameter,
    responseType: 'blob'
  })
}
export function auditWithdraw(parameter) {
  return axios({
    url: api.auditWithdraw,
    method: 'post',
    data: parameter
  })
}
export function confirmWithdraw(parameter) {
  return axios({
    url: api.confirmWithdraw,
    method: 'post',
    data: parameter
  })
}
export function applyWithdraw(parameter) {
  return axios({
    url: api.applyWithdraw,
    method: 'post',
    data: parameter
  })
}
export function clerkOrder(parameter) {
  return axios({
    url: api.clerkOrder,
    method: 'get',
    params: parameter
  })
}
export function expclerkOrder(parameter) {
  return axios({
    url: api.clerkOrder,
    method: 'get',
    params: parameter,
    responseType: 'blob'
  })
}